.\"     Title: \fBndbd\fR
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
.\"      Date: 03/31/2009
.\"    Manual: MySQL Database System
.\"    Source: MySQL 5.1
.\"
.TH "\fBNDBD\fR" "8" "03/31/2009" "MySQL 5.1" "MySQL Database System"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
ndbd \- the storage engine node process
.SH "SYNOPSIS"
.HP 13
\fBndbd \fR\fB\fIoptions\fR\fR
.SH "DESCRIPTION"
.PP
\fBndbd\fR
is the process that is used to handle all the data in tables using the NDB Cluster storage engine. This is the process that empowers a data node to accomplish distributed transaction handling, node recovery, checkpointing to disk, online backup, and related tasks.
.PP
In a MySQL Cluster, a set of
\fBndbd\fR
processes cooperate in handling data. These processes can execute on the same computer (host) or on different computers. The correspondences between data nodes and Cluster hosts is completely configurable.
.PP
\fBndbd\fR
generates a set of log files which are placed in the directory specified by
DataDir
in the
\fIconfig.ini\fR
configuration file.
.PP
These log files are listed below.
\fInode_id\fR
is the node's unique identifier. Note that
\fInode_id\fR
represents the node's unique identifier. For example,
\fIndb_2_error.log\fR
is the error log generated by the data node whose node ID is
2.
.TP 3n
\(bu
\fIndb_\fR\fI\fInode_id\fR\fR\fI_error.log\fR
is a file containing records of all crashes which the referenced
\fBndbd\fR
process has encountered. Each record in this file contains a brief error string and a reference to a trace file for this crash. A typical entry in this file might appear as shown here:
.sp
.RS 3n
.nf
Date/Time: Saturday 30 July 2004 \- 00:20:01
Type of error: error
Message: Internal program error (failed ndbrequire)
Fault ID: 2341
Problem data: DbtupFixAlloc.cpp
Object of reference: DBTUP (Line: 173)
ProgramName: NDB Kernel
ProcessID: 14909
TraceFile: ndb_2_trace.log.2
***EOM***
.fi
.RE
Listings of possible
\fBndbd\fR
exit codes and messages generated when a data node process shuts down prematurely can be found in
[1]\&\fIndbd Error Messages\fR.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBImportant\fR
\fIThe last entry in the error log file is not necessarily the newest one\fR
(nor is it likely to be). Entries in the error log are
\fInot\fR
listed in chronological order; rather, they correspond to the order of the trace files as determined in the
\fIndb_\fR\fI\fInode_id\fR\fR\fI_trace.log.next\fR
file (see below). Error log entries are thus overwritten in a cyclical and not sequential fashion.
.TP 3n
\(bu
\fIndb_\fR\fI\fInode_id\fR\fR\fI_trace.log.\fR\fI\fItrace_id\fR\fR
is a trace file describing exactly what happened just before the error occurred. This information is useful for analysis by the MySQL Cluster development team.
.sp
It is possible to configure the number of these trace files that will be created before old files are overwritten.
\fItrace_id\fR
is a number which is incremented for each successive trace file.
.TP 3n
\(bu
\fIndb_\fR\fI\fInode_id\fR\fR\fI_trace.log.next\fR
is the file that keeps track of the next trace file number to be assigned.
.TP 3n
\(bu
\fIndb_\fR\fI\fInode_id\fR\fR\fI_out.log\fR
is a file containing any data output by the
\fBndbd\fR
process. This file is created only if
\fBndbd\fR
is started as a daemon, which is the default behavior.
.TP 3n
\(bu
\fIndb_\fR\fI\fInode_id\fR\fR\fI.pid\fR
is a file containing the process ID of the
\fBndbd\fR
process when started as a daemon. It also functions as a lock file to avoid the starting of nodes with the same identifier.
.TP 3n
\(bu
\fIndb_\fR\fI\fInode_id\fR\fR\fI_signal.log\fR
is a file used only in debug versions of
\fBndbd\fR, where it is possible to trace all incoming, outgoing, and internal messages with their data in the
\fBndbd\fR
process.
.sp
.RE
.PP
It is recommended not to use a directory mounted through NFS because in some environments this can cause problems whereby the lock on the
\fI.pid\fR
file remains in effect even after the process has terminated.
.PP
To start
\fBndbd\fR, it may also be necessary to specify the host name of the management server and the port on which it is listening. Optionally, one may also specify the node ID that the process is to use.
.sp
.RS 3n
.nf
shell> \fBndbd \-\-connect\-string="nodeid=2;host=ndb_mgmd.mysql.com:1186"\fR
.fi
.RE
.PP
See
Section\ 17.3.4.3, \(lqThe MySQL Cluster Connectstring\(rq, for additional information about this issue.
Section\ 17.6.2, \(lqCommand Options for MySQL Cluster Processes\(rq, describes other options for
\fBndbd\fR.
.PP
When
\fBndbd\fR
starts, it actually initiates two processes. The first of these is called the
\(lqangel process\(rq; its only job is to discover when the execution process has been completed, and then to restart the
\fBndbd\fR
process if it is configured to do so. Thus, if you attempt to kill
\fBndbd\fR
via the Unix
\fBkill\fR
command, it is necessary to kill both processes, beginning with the angel process. The preferred method of terminating an
\fBndbd\fR
process is to use the management client and stop the process from there.
.PP
The execution process uses one thread for reading, writing, and scanning data, as well as all other activities. This thread is implemented asynchronously so that it can easily handle thousands of concurrent actions. In addition, a watch\-dog thread supervises the execution thread to make sure that it does not hang in an endless loop. A pool of threads handles file I/O, with each thread able to handle one open file. Threads can also be used for transporter connections by the transporters in the
\fBndbd\fR
process. In a multi\-processor system performing a large number of operations (including updates), the
\fBndbd\fR
process can consume up to 2 CPUs if permitted to do so.
.PP
For a machine with many CPUs it is possible to use several
\fBndbd\fR
processes which belong to different node groups; however, such a configuration is still considered experimental and is not supported for MySQL 5.1 in a production setting. See
Section\ 17.13, \(lqKnown Limitations of MySQL Cluster\(rq.
.SH "COPYRIGHT"
.PP
Copyright 2007\-2008 MySQL AB, 2009 Sun Microsystems, Inc.
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA or see http://www.gnu.org/licenses/.
.SH "REFERENCES"
.TP 3
1.\ ndbd Error Messages
\%http://dev.mysql.com/doc/ndbapi/en/ndbd\-error\-messages.html
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
MySQL AB (http://www.mysql.com/).
